from appium.webdriver.common.mobileby import MobileBy
from app_study.app_snowball.base.snowball_app import SnowballApp
from app_study.app_snowball.page.search_page import SearchPage

class MainPage(SnowballApp):

    _SEARCH_BOX_ELEMENT = (MobileBy.ID, "com.xueqiu.android:id/home_search")

    def click_search(self):
        # click searchbox 搜索框
        self.find_and_click(*self._SEARCH_BOX_ELEMENT)

        return SearchPage(self.driver)